This invention relates to the field of computer systems. More particularly, a system and methods are provided for facilitating the drawing of visually pleasing dashed paths.
A dashed path is a sequence of adjacent (e.g., connecting) curves comprising alternating stroke segments and gap segments. Gap segments are blank or devoid of color, or of the same color as the background, while stroke segments are drawn in a foreground color that differs from the background color. A user-defined dashed path is normally defined as a series of stroke and gap segments, of specified lengths, leading from the starting point of the path to the end point.
A dashed path looks best when critical portions of the path (e.g., corners, intersections with other graphical elements, endpoints) are bisected or highlighted by stroked segments. When, instead, a critical portion is bisected by an off-center stroke segment or gap, the line may be less attractive.
Traditional drawing tools and methods generally produce unattractive dashed paths, because they strictly apply defined stroke segments and gap segments from a starting point to an ending point without regard for the resulting appearance. For example, on anything other than line segments, these tools and methods fail to straddle corners (and other key features) and often do not terminate precisely at the endpoints of the path. Only by chance are critical path portions covered by stroke segments.
In addition, these tools generally do not allow the length of a stroke segment or gap segment to be scaled, or otherwise allow for the dynamic adjustment of a segmentation pattern to place stroke segments so as to make the result more visually pleasing.
Because they do not support scaling of segments, traditional drawing tools also do not allow variable scaling, wherein some segments remain fixed in size and/or position and other segments of the same curve or path are permitted to expand or contract in size. Yet further, traditional drawing tools do not support the drawing of paths using multi-dimensional pattern drawing.
Therefore, there is a need for a system and a method of applying and scaling stroke or gap segments of a user-defined path to make the resulting dashed path more attractive.